<?php
function smarty_insert_getusernameheor($param, &$smarty) {
				
	if ($_SESSION['union_username']=='') {
		$string="<form method=\"post\" id=\"formhero\" action=\"https://passport.9wee.com/login\" onsubmit='javascript: return checklogininfo();'>
					<ul>
											<li>用户名 <input class=\"yx_dl_input\" name=\"username\" type=\"text\" /></li>
					<li>密　码 <input class=\"yx_dl_input\" name=\"password\" type=\"password\" /><input id='_REFERER' type='hidden' name='_REFERER' value='http://".$param['url']."/game/?game=103'></li>
					<li><input type=\"image\" src=\"../images/hero/login_bar.gif\" />　<a href=\"javascript:;\" onclick=\"var obj=document.getElementById('cover');obj.style.display='block';obj.style.height=document.documentElement.scrollHeight+'px';obj.style.width=document.documentElement.scrollWidth+'px';server_select_yx('open');\"\"><img src=\"../images/hero/user_reg.gif\" /></a></li>
					<li><img src=\"../images/hero/mianz.gif\" />&nbsp;&nbsp;&nbsp;<a href='http://".$param['url']."/passport_index.php'><img src=\"../images/hero/pass.gif\" /></a></li>
					</ul></form>";
	} else {
		$string="<ul><li>".$_SESSION['union_username']."</li>
					<li>欢迎您回来</li>
					<li style=\"margin-top:20px;\"><a href=\"javascript:;\" onclick=\"server_select('open');\"><input type=\"image\" src=\"../images/hero/login_jl.gif\" /></a> <a href=\"../logout.php?url=http://".$param['url']."/game/?game=103\"><img src=\"../images/hero/login_tc.gif\" /></a></li>
					<li><span class=\"yx_dl_int\">忘记密码</span>　　<span class=\"yx_dl_int\">免费责款</span></li>
					</ul>";
					
	}
	return $string;
 }
?>
